﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobjlist of Article">
	<Sql>
		SELECT
			Articles.id, baseTitle, translatedTitles, translationDetails, c.keyName
		FROM
			Articles
			LEFT OUTER JOIN ObjectTreeNodes t ON t.objectId = Articles.id
			LEFT OUTER JOIN ObjectTreeCounts c on t.objectId = c.objectId
		WHERE
			companyId = @companyId AND treeName = @treeName
		ORDER BY
			c.keyName
	</Sql>
	<Param name="companyId" type="UniqueIdentifier" />
	<Param name="treeName" type="UnicodeVarChar" />
</AdoNetDataAccess>
